<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>04_作用域_面试题</title>
</head>
<body>
<!-- 
    与在哪里调用没关系，与在哪里定义有关系
-->
<script>
var x = 10
function fn() {
    console.log(x)
}
function show(f) {
    var x = 20
    f()
}

show(fn) // 10
</script>
</body>
</html>